/*
 * @Author       : ljkt
 * @Version      : 1.0
 * @Date         : 2021-10-05 18:00:43
 * @LastEditors: ljkt
 * @LastEditTime: 2024-05-31 14:00:45
 * @Description  :
 */

#ifndef _DEV_TM1640_H_
#define _DEV_TM1640_H_
#define Dev_Tm1640_Task_Time (50)
#define GRID1 0
#define GRID2 1
#define GRID3 2
#define GRID4 3
#define GRID5 4
#define GRID6 5
#define GRID7 6
#define GRID8 7
#define GRID9 8
#define GRID10 9
#define GRID11 10
#define GRID12 11
#define GRID13 12
#define GRID14 13
#define GRID15 14
#define GRID16 15

#define SEG1 (1 << 7)
#define SEG2 (1 << 6)
#define SEG3 (1 << 5)
#define SEG4 (1 << 4)
#define SEG5 (1 << 3)
#define SEG6 (1 << 2)
#define SEG7 (1 << 1)
#define SEG8 (1 << 0)

#define SEG9 (1 << 15)
#define SEG10 (1 << 14)
#define SEG11 (1 << 13)
#define SEG12 (1 << 12)
#define SEG13 (1 << 11)
#define SEG14 (1 << 10)
#define SEG15 (1 << 9)
#define SEG16 (1 << 8)
typedef struct
{
	unsigned char Buf[16];
} s_dev_Tm1640_t;
extern Ram s_dev_Tm1640_t gDev_Tm1640;
void Dev_Tm1640_Init(void);
void Dev_Tm1640_Close(void);
void Dev_Tm1640_Scan(void);
#endif
